package com.xbongbong.saas.domain.dao;


import java.util.List;
import java.util.Map;

import com.xbongbong.saas.domain.entity.PurchaseBalanceEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

@Mapper
@Repository
public interface PurchaseBalanceDao {
    Long insert(PurchaseBalanceEntity entity);

    void insertBatch(List<PurchaseBalanceEntity> list);

    PurchaseBalanceEntity getByKey(@Param("key") Long key, @Param("corpid") String corpid);

    Integer update(PurchaseBalanceEntity entity);

    List<PurchaseBalanceEntity> findEntitys(@Param("param") Map<String, Object> param);

    Integer getEntitysCount(@Param("param") Map<String, Object> param);

    Integer batchUpdateDel( @Param("corpid") String corpid,  @Param("onlyKeyIn") List<String> onlyKeyIn,@Param("del") Integer del);

    List<PurchaseBalanceEntity> findByOnlyKeys(@Param("corpid") String corpid,  @Param("onlyKeyIn") List<String> onlyKeyIn);

    Integer updateBatch(@Param("list") List<PurchaseBalanceEntity> purchaseBalanceEntityList, @Param("corpid") String corpid);

    PurchaseBalanceEntity getByOnlyKey(@Param("corpid") String corpid, @Param("onlyKey") String onlyKey);
}